/**
 * 默认加载
 * @type {{init: Window.process.init, public: Window.process.public}}
 */
window.process = {
    init: function () {
        this.public();
    },
    public: function () {
        //编辑信息
        $('#edit').click(function () {
            if($(this).hasClass('on')){
                $(this).removeClass('on').text('编辑');
                $('.file').hide();
                $('.showBox').show();
                $('input').prop('disabled','disabled');
            }else{
                $(this).addClass('on').text('取消编辑');
                $('.file').show();
                $('.showBox').hide();
                $('input').removeAttr("disabled");
            }
        });



        //添加图片
        $("#file1").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up1').html(html);

            }
        });

        $("#file2").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up2').html(html);

            }
        });
        $("#file3").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up3').html(html);

            }
        });
        $("#file4").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up4').html(html);

            }
        });
        $("#file5").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up5').html(html);

            }
        });
        $("#file6").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up6').html(html);

            }
        });
        $("#file7").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var data= result.base64;
                var html='<img src="'+data+'" />';
                $('.up7').html(html);

            }
        });

    }
};

/**
 * 启动方法执行
 */
process.init();



